import Domain from './Domain.js';
let map1 = new Domain();
export default class Rect {
    constructor(x, y, color) {
        // 创建一个div 作为方块
        this.ele = document.createElement("div");
        this.x = x;  // 方块左边的距离
        this.y = y;  // 方块距离上边的位置
        this.color = color;
        this.setStyle();
    }
    setStyle() {
        this.ele.style.width = "50px";
        this.ele.style.height = "50px";
        this.ele.style.position = "absolute";
        this.ele.style.left = this.x + "px";
        this.ele.style.top = this.y + "px";
        // this.ele.style.border = "1px solid";
        this.ele.style.backgroundColor = this.color;
        map1.ele.appendChild(this.ele);
    }
}
